import endsWith from 'lodash/endsWith'

export default (path) => {
  let url = window.url || ''
  if (url && !endsWith(url, '/')){
    url = `${url}/`
  }

  return `${url}${path}`;
};
